package cn.itcast.service.impl;

import cn.itcast.mapper.LogMapper;
import cn.itcast.mapper.OperateLogMapper;
import cn.itcast.pojo.OperateLog;
import cn.itcast.pojo.PageResult;
import cn.itcast.pojo.Result;
import cn.itcast.service.logService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LogServiceImpl implements logService {
    @Autowired
    private LogMapper logMapper;

    @Autowired
    private OperateLogMapper operateLogMapper;

    @Override
    public Result selectByPage(Integer page, Integer pageSize) {
       /* //1.启动分页助手
        PageHelper.startPage(page, pageSize);
        List<OperateLog> list = logMapper.selectByPage();
        //2.向下转型
        Page<OperateLog> p = (Page<OperateLog>) list;

        long total = p.getTotal();
        List<OperateLog> result = p.getResult();

        PageResult<OperateLog> empLogPageResult = new PageResult<>(total, result);


        return Result.success("分页查询成功", empLogPageResult);*/
        return null;
    }
}
